package com.jason.seckill.rabbitmq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.Collection;

@Slf4j
@Component
public class MQSender {
    @Autowired
    private RabbitTemplate rabbitTemplate;
    public void sendSeckillMessage(String message){
        rabbitTemplate.convertAndSend("seckillExchange","seckill.message",message);
    }

}
